package com.minelx.landisk.filesystem.core.provider;

import com.minelx.landisk.filesystem.core.values.PathDescription;
import org.apache.hadoop.fs.FileSystem;

class HDFS implements FS {
	private final FileSystem fileSystem;

	HDFS(FileSystem fileSystem) {
		this.fileSystem = fileSystem;
	}

	@Override
	public PathMethodProvider provider(PathDescription description) {
		return new HDFSPathMethodProvider(fileSystem, schemaAndAuthority(), description);
	}

	@Override
	public String schemaAndAuthority() {
		return fileSystem.getUri().toString();
	}
}
